const Mock = require('mockjs')

const data = Mock.mock({
  'items|20': [{
    id: '@id',
    name: '@cname',
    'health_code|1': ['green', 'yellow', 'red'],
    age: '@integer(20, 48)',
    address: '@city(true)',
    'work_in_time|1': ['@date("2015-MM-dd")', '@date("2017-MM-dd")', '@date("2019-MM-dd")'],
    'sex|1': ['男', '女']
  }]
})

module.exports = [
  {
    url: '/facemaskadmin/employeesinfo/list',
    type: 'get',
    response: config => {
      const items = data.items
      return {
        code: 200,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
